#-*-coding:utf-8 -*-
from Marchines import C45
import pandas as pd

# data = pd.read_csv('mydata_3.csv')
# print(data[:2])

fr = open('mydata_3.csv',encoding='utf8')
lenses = [inst.strip().split(',') for inst in fr.readlines()]
print(lenses[1:])
print(lenses[0])

lensesLables = lenses[0]
LensesTree = C45.createTree(lenses[1:],lensesLables)
print(LensesTree)
C45.createPlot(LensesTree)
